Re-fix macOS host + linux-bionic-arm64 target cross-compile #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: a2fd74c
Context: https://github.com/dotnet/runtime/blob/132725d3702d51d78b5f68b0501c5e5845921d04/src/coreclr/nativeaot/docs/android-bionic.md#known-issues
Commit a2fd74c had a fatal flaw: it would immediately crash on launch:
Turns out™ that the android-bionic.md documentation has a Known issues section, which has a better workaround:
That workaround does work, better than the attempted workaround in a2fd74c.
Update
libdotnet.targets
to use the documented workaround.Additionally,
libdotnet.so
depends onlibc++_shared.so
:and
libc++_shared.so
needs to be included in the.apk
.Add a new
_CopyLibcppShared
target which copieslibc++_shared.so
from the NDK intoNative/app/src/main/jniLibs/arm64-v8a
. Failure to do so results in an error at startup:Update
README.md
to contain clear(er) instruction on how to build and run this sample.